Skip to content

fix(darwin): update minimum macOS version from 10.15 to 12.0#5253

Closed
leaanthony wants to merge 3 commits into
masterfrom
fix/5161-mac-min-version
Closed

fix(darwin): update minimum macOS version from 10.15 to 12.0#5253
leaanthony wants to merge 3 commits into
masterfrom
fix/5161-mac-min-version

Conversation

@leaanthony

@leaanthony leaanthony commented Apr 26, 2026

Copy link
Copy Markdown
Member

Summary

  • Updates macOS minimum version in templates from 10.15 to 12.0
  • Since Go 1.25, the linker embeds LC_BUILD_VERSION with minos 12.0, making binaries physically incompatible with macOS < 12
  • The old LSMinimumSystemVersion: 10.15.0 caused macOS to allow launch but the kernel would reject the binary silently
  • Now macOS shows a clear dialog: "MyApp requires macOS 12 or later"

Files Changed

  • v3/internal/commands/updatable_build_assets/darwin/Info.plist.tmpl - LSMinimumSystemVersion → 12.0
  • v3/internal/commands/updatable_build_assets/darwin/Info.dev.plist.tmpl - LSMinimumSystemVersion → 12.0
  • v3/internal/commands/build_assets/darwin/Taskfile.yml - CGO_CFLAGS, CGO_LDFLAGS, MACOSX_DEPLOYMENT_TARGET → 12.0

Test

  • v3/test/5161/darwin_min_version_test.go - Verifies templates contain 12.0 and not 10.15

Fixes #5161

Summary by CodeRabbit

  • Chores

    • Updated native build and app metadata to require macOS 12.0 as the minimum supported version (previously 10.15).
  • Tests

    • Added tests that verify macOS minimum version is set to 12.0 across build assets and app metadata to prevent regressions.

Since Go 1.25, the linker embeds LC_BUILD_VERSION with minos 12.0, making
binaries incompatible with macOS < 12. Update templates to match so macOS
shows a clear version requirement dialog instead of silently failing.

Fixes #5161
@coderabbitai

coderabbitai Bot commented Apr 26, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 240417e6-b78f-416a-a0e2-a256de999097

📥 Commits

Reviewing files that changed from the base of the PR and between 5fcb5ca and 29729a7.

📒 Files selected for processing (1)
  • v3/test/5161/darwin_min_version_test.go
✅ Files skipped from review due to trivial changes (1)
  • v3/test/5161/darwin_min_version_test.go

Walkthrough

This PR raises the macOS minimum deployment target from 10.15 to 12.0 in Darwin build templates and adds tests that verify Info.plist templates and Taskfile.yml reflect the 12.0 requirement.

Changes

Cohort / File(s) Summary
macOS Build Configuration
v3/internal/commands/build_assets/darwin/Taskfile.yml, v3/internal/commands/updatable_build_assets/darwin/Info.dev.plist.tmpl, v3/internal/commands/updatable_build_assets/darwin/Info.plist.tmpl
Bumps declared minimum macOS version from 10.15 to 12.0: updates LSMinimumSystemVersion in plist templates and replaces -mmacosx-version-min=10.15 / MACOSX_DEPLOYMENT_TARGET: "10.15" with 12.0 in the native build task.
macOS Version Validation Tests
v3/test/5161/darwin_min_version_test.go
Adds tests that assert plist templates contain LSMinimumSystemVersion == 12.0 and that Taskfile.yml contains -mmacosx-version-min=12.0 and MACOSX_DEPLOYMENT_TARGET: "12.0".

Sequence Diagram(s)

(no sequence diagrams generated for these changes)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • wailsapp/wails#3981: Updates the same darwin Info.plist templates and adjusts LSMinimumSystemVersion values.

Suggested labels

MacOS

Poem

🐰 I hopped through templates, tidy and spry,
Bumped min version up to twelve, oh my!
No more phantom quits at app start,
plist and build now play their part.
A carrot-coded cheer — let's ship it, hi-fi! 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed Title is clear, concise, and directly describes the main change: updating macOS minimum version from 10.15 to 12.0.
Description check ✅ Passed Description includes rationale, file changes, test additions, and issue reference, but does not follow the template format with checklists.
Linked Issues check ✅ Passed All code changes in the PR directly address issue #5161: updating Info.plist templates and Taskfile.yml to set macOS minimum version to 12.0, with verification tests added.
Out of Scope Changes check ✅ Passed All changes are scoped to updating macOS minimum version requirements as specified in issue #5161; no unrelated modifications detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/5161-mac-min-version

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.11.4)

level=error msg="[linters_context] typechecking error: pattern ./...: directory prefix . does not contain main module or its selected dependencies"


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@leaanthony leaanthony changed the base branch from v3-alpha to master April 29, 2026 13:06
@leaanthony leaanthony marked this pull request as ready for review April 29, 2026 14:06
Copilot AI review requested due to automatic review settings April 29, 2026 14:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates Wails v3 macOS (darwin) build/template assets to declare a minimum supported macOS version of 12.0, aligning template metadata and build flags with Go 1.25+ Mach-O minimum OS behavior (so users on older macOS get a clear “requires macOS 12 or later” dialog instead of a silent failure).

Changes:

  • Bump LSMinimumSystemVersion in darwin Info.plist templates to 12.0.
  • Bump darwin build Taskfile -mmacosx-version-min and MACOSX_DEPLOYMENT_TARGET to 12.0.
  • Add a regression test ensuring templates/Taskfile no longer reference 10.15 and do reference 12.0.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
v3/internal/commands/updatable_build_assets/darwin/Info.plist.tmpl Raises LSMinimumSystemVersion to 12.0 in the release plist template.
v3/internal/commands/updatable_build_assets/darwin/Info.dev.plist.tmpl Raises LSMinimumSystemVersion to 12.0 in the dev plist template.
v3/internal/commands/build_assets/darwin/Taskfile.yml Updates native build env flags to target macOS 12.0 minimum.
v3/test/5161/darwin_min_version_test.go Adds coverage to prevent regressions back to 10.15 in templates/Taskfile.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

{{- end}}
<key>LSMinimumSystemVersion</key>
<string>10.15.0</string>
<string>12.0</string>

Copilot AI Apr 29, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LSMinimumSystemVersion was previously expressed as a 3-segment version (e.g. 10.15.0), but is now 12.0. Elsewhere in the repo (eg v3/examples/dev/build/Info.plist) the value uses a major.minor.patch format; consider using 12.0.0 for consistency and to avoid any potential parsing differences across macOS versions.

Suggested change
<string>12.0</string>
<string>12.0.0</string>

Copilot uses AI. Check for mistakes.
Comment thread v3/test/5161/darwin_min_version_test.go Outdated
{{- end}}
<key>LSMinimumSystemVersion</key>
<string>10.15.0</string>
<string>12.0</string>

Copilot AI Apr 29, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LSMinimumSystemVersion was previously expressed as a 3-segment version (e.g. 10.15.0), but is now 12.0. Elsewhere in the repo (eg v3/examples/dev/build/Info.plist) the value uses a major.minor.patch format; consider using 12.0.0 for consistency and to avoid any potential parsing differences across macOS versions.

Suggested change
<string>12.0</string>
<string>12.0.0</string>

Copilot uses AI. Check for mistakes.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
v3/test/5161/darwin_min_version_test.go (1)

37-44: Remove or fix the dead plist parsing that cannot succeed on unrendered templates.

The templates contain Go template syntax (e.g., {{.ProductName}}), so plist.Unmarshal() will always fail silently, causing lines 40–42 to be skipped regardless of the actual LSMinimumSystemVersion value. The string-based checks on lines 29–35 do validate that "12.0" exists in the template, so remove the misleading plist block entirely or parse only after rendering (if template rendering is part of the test scope).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@v3/test/5161/darwin_min_version_test.go` around lines 37 - 44, Remove the
dead plist parsing block that attempts plist.Unmarshal into plistDict and checks
LSMinimumSystemVersion (the code that references plist.Unmarshal, plistDict,
minVer and expectedVersion) because template placeholders (e.g.,
{{.ProductName}}) make unmarshalling always fail; either delete the entire
if-block checking plist.Unmarshal/LSMinimumSystemVersion or modify the test to
render the template before unmarshalling so plist.Unmarshal can succeed — ensure
you remove references to plist.Unmarshal, plistDict, minVer and the subsequent
t.Errorf check if you choose deletion.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@v3/test/5161/darwin_min_version_test.go`:
- Around line 37-44: Remove the dead plist parsing block that attempts
plist.Unmarshal into plistDict and checks LSMinimumSystemVersion (the code that
references plist.Unmarshal, plistDict, minVer and expectedVersion) because
template placeholders (e.g., {{.ProductName}}) make unmarshalling always fail;
either delete the entire if-block checking
plist.Unmarshal/LSMinimumSystemVersion or modify the test to render the template
before unmarshalling so plist.Unmarshal can succeed — ensure you remove
references to plist.Unmarshal, plistDict, minVer and the subsequent t.Errorf
check if you choose deletion.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d00b2139-84cb-48cd-bf6f-f2716c8881f1

📥 Commits

Reviewing files that changed from the base of the PR and between 3b317b1 and 5fcb5ca.

📒 Files selected for processing (4)
  • v3/internal/commands/build_assets/darwin/Taskfile.yml
  • v3/internal/commands/updatable_build_assets/darwin/Info.dev.plist.tmpl
  • v3/internal/commands/updatable_build_assets/darwin/Info.plist.tmpl
  • v3/test/5161/darwin_min_version_test.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@leaanthony leaanthony closed this May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[v3] mac minimum build version should be 12.0

2 participants